5645d4
@@ -4960,6 +4960,10 @@
public class HRegion implements HeapSize { // , Writable{
             Store store = stores.get(family.getKey());
             List<Cell> kvs = new ArrayList<Cell>(family.getValue().size());
 
+            // Sort the cells so that they match the order that they
+            // appear in the Get results. Otherwise, we won't be able to
+            // find the existing values if the cells are not specified
+            // in order by the client since cells are in an array list.
             Collections.sort(family.getValue(), store.getComparator());
             // Get previous values for all columns in this family
             Get get = new Get(row);
@@ -5155,6 +5159,11 @@
public class HRegion implements HeapSize { // , Writable{
             Store store = stores.get(family.getKey());
             List<Cell> kvs = new ArrayList<Cell>(family.getValue().size());
 
+            // Sort the cells so that they match the order that they
+            // appear in the Get results. Otherwise, we won't be able to
+            // find the existing values if the cells are not specified
+            // in order by the client since cells are in an array list.
+            Collections.sort(family.getValue(), store.getComparator());
             // Get previous values for all columns in this family
             Get get = new Get(row);
             for (Cell cell: family.getValue()) {
